package com.han.bom;

import java.util.ArrayList;

/**
 * An extension of the Exam. Represents a Mock Exam for the Students for them to review themselves.
 * 
 * @author Nicol Angelo A. Santos
 * @version 1.0
 * @since JDK 1.7
 * @see Exam
 */

public class PracticeExam extends Exam{
	
	private int timesTaken;
	/**
	 * Default Constructor
	 *
	 * Increments the number of all exams, and sets the ID for the Exam.
	 * Initializes the Exam Name to "" and the List of Questions to null.
	 * 
	 */
	public PracticeExam() {
		this("", new ArrayList<Question>());
	}

	/**
	 * Constructor
	 *
	 * Increments the number of all exams, and sets the ID for the Exam.
	 * Initializes the Exam Name and the List of Questions through the given parameters
	 * of the constructor.
	 *
	 * @param examName
	 * @param questions
	 */
	public PracticeExam(String examName, ArrayList<Question> questions) {
		super();
		setTotalNumExams(getTotalNumExams()+1);
		this.setExamID("E"+getTotalNumExams()+"PE");
		this.setExamName(examName);
		this.setQuestions(questions);
	}

	public int getTimesTaken() {
		return timesTaken;
	}

	public void setTimesTaken(int timesTaken) {
		this.timesTaken = timesTaken;
	}
}
